import request from '@/utils/request'

// 查询菜单列表
export function listIndicatorLibraryManagement(query) {
  return request({
    url: '/goldwind/performance/pt-performance-target-manage/selectPage',
    method: 'get',
    params: query
  })
}
// 模板下载
export function templateLibraryManagement() {
  return request({
    url: '/goldwind/performance/pt-performance-target-manage/importTemplate',
    method: 'get',
    responseType: 'blob',
  })
}
// 导出菜单列表
export function exportLibraryManagement(query) {
  return request({
    url: '/goldwind/performance/pt-performance-target-manage/selectPage',
    method: 'get',
    params: query,
    responseType: 'blob',
  })
}
// 导入菜单列表
export function importManagement(data) {
  return request({
    url: '/goldwind/performance/pt-performance-target-manage/importData',
    method: 'post',
    data
  })
}
// 新增菜单列表
export function addptManagement(data) {
  return request({
    url: '/goldwind/performance/pt-performance-target-manage/addPtPerformanceTarget',
    method: 'post',
    data
  })
}

// 通过id获取详情页数据
export function editptManagement(id) {
  return request({
    url: `/goldwind/performance/pt-performance-target-manage/selectTargetManageById/?id=` + id,
    method: 'get',
  })
}
// 新增菜单列表
export function delptManagement(ids) {
  return request({
    url: `/goldwind/performance/pt-performance-target-manage/deleteBatchByIds/?ids=` + ids,
    method: 'delete'
  })
}

// 修改菜单列表
export function reqUpdateptManagement(data) {
  return request({
    url: '/goldwind/performance/pt-performance-target-manage/updatePtPerformanceTarget',
    method: 'put',
    data: data
  })
}